package com.jyw.business.de.service.impl;

import java.util.List;
import com.jyw.common.utils.DateUtils;
import org.springframework.stereotype.Service;
import com.jyw.business.de.mapper.DeDemandResearchMapper;
import com.jyw.business.de.domain.DeDemandResearch;
import com.jyw.business.de.service.IDeDemandResearchService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import javax.annotation.Resource;

/**
 * 需求-调研信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-02-19
 */
@Service
public class DeDemandResearchServiceImpl extends ServiceImpl<DeDemandResearchMapper,DeDemandResearch> implements IDeDemandResearchService
{
    @Resource
    private DeDemandResearchMapper deDemandResearchMapper;

    /**
     * 查询需求-调研信息
     * 
     * @param id 需求-调研信息主键
     * @return 需求-调研信息
     */
    @Override
    public DeDemandResearch selectDeDemandResearchById(Long id)
    {
        return deDemandResearchMapper.selectDeDemandResearchById(id);
    }

    /**
     * 查询需求-调研信息列表
     * 
     * @param deDemandResearch 需求-调研信息
     * @return 需求-调研信息
     */
    @Override
    public List<DeDemandResearch> selectDeDemandResearchList(DeDemandResearch deDemandResearch)
    {
        return deDemandResearchMapper.selectDeDemandResearchList(deDemandResearch);
    }

    /**
     * 新增需求-调研信息
     * 
     * @param deDemandResearch 需求-调研信息
     * @return 结果
     */
    @Override
    public int insertDeDemandResearch(DeDemandResearch deDemandResearch)
    {
        deDemandResearch.setCreateTime(DateUtils.getNowDate());
        return deDemandResearchMapper.insertDeDemandResearch(deDemandResearch);
    }

    /**
     * 修改需求-调研信息
     * 
     * @param deDemandResearch 需求-调研信息
     * @return 结果
     */
    @Override
    public int updateDeDemandResearch(DeDemandResearch deDemandResearch)
    {
        return deDemandResearchMapper.updateDeDemandResearch(deDemandResearch);
    }

    /**
     * 批量删除需求-调研信息
     * 
     * @param ids 需要删除的需求-调研信息主键
     * @return 结果
     */
    @Override
    public int deleteDeDemandResearchByIds(Long[] ids)
    {
        return deDemandResearchMapper.deleteDeDemandResearchByIds(ids);
    }

    /**
     * 删除需求-调研信息信息
     * 
     * @param id 需求-调研信息主键
     * @return 结果
     */
    @Override
    public int deleteDeDemandResearchById(Long id)
    {
        return deDemandResearchMapper.deleteDeDemandResearchById(id);
    }
}
